<template>
  <n-user-info :selected="0">
    <template #default>
      <div style="margin-bottom: 50px; width: 1000px;">
        <div class="info">
          <div
            class="avatar"
            @click="this.$router.push('/userSetting')"
          >
            <el-avatar
              :size="100"
              :src="avatar"
            ></el-avatar>
            <span style="margin-top: 10px; ">{{ name }}</span>
          </div>
          <div style="margin-left: 10px"></div>
        </div>
        <div style="width: 100%; background-color: #fff; padding-top: 20px;">
          <span style="padding-left: 20px; font-weight: 500px; font-size: 20px;">我的订单</span>
          <el-divider></el-divider>
          <order-tools></order-tools>
          <el-divider></el-divider>
          <item-cards></item-cards>
        </div>
      </div>
    </template>
  </n-user-info>
</template>

<script>
import ItemCardsVue from "@/components/userInfo/ItemCards.vue";
import OrderToolsVue from "@/components/userInfo/OrderTools.vue";
import NUserInfoVue from "@/components/NUserInfo.vue";
import { useUserInfo } from "@/store/user.js";
const userInfoState = useUserInfo();

export default {
  components: {
    ItemCards: ItemCardsVue,
    OrderTools: OrderToolsVue,
    NUserInfo: NUserInfoVue,
  },
  data() {
    return {
      name: "fall",
      avatar: userInfoState.avatar,
    };
  },
};
</script>

<style scoped>
.avatar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-right: 1px solid #eae5e3;
  padding: 0 50px;
  cursor: pointer;
}

.header {
  background-color: #eae5e3;
}

.main {
  background-color: #f0f3ef;
  overflow: hidden;
  padding: 0;
}

.info {
  width: 100%;
  height: 200px;
  background-color: #fff;
  display: flex;
}
</style>